﻿@model IEnumerable<QRCodeForRealEstate.Models.HomeForSale>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.Name)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Description)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Address)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.StartDate)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.EndDate)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.DaysOnMarket)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Heating)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.YearBuilt)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.AskingPrice)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.GeoLocation)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.MainPicture)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Picture1Name)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Picture1)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Picture2Name)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Picture2)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Picture3Name)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Picture3)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Picture4Name)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Picture4)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Picture5Name)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Picture5)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Active)
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Description)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Address)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.StartDate)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.EndDate)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.DaysOnMarket)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Heating)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.YearBuilt)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.AskingPrice)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.GeoLocation)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.MainPicture)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Picture1Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Picture1)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Picture2Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Picture2)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Picture3Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Picture3)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Picture4Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Picture4)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Picture5Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Picture5)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Active)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.AgentUserName }) |
            @Html.ActionLink("Details", "Details", new { id=item.AgentUserName }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.AgentUserName })
        </td>
    </tr>
}

</table>
